<% if @tasks.size == 0 -%>
No tasks. To add a task, click 'New Task'<br/>
<br/>
<% end -%>
<input class="button" type="button" onclick="add_new_row();return false;" onmouseover="mover('a')" onmouseout="mover('')" value="New Task">
<img id="loading" src="/images/loading.gif" style="display:none;"><br/>

<% form_tag({:action=> :post}, {:name => 'tasksform'}) do %>

<!-- Tasks -->

<ul id="taskslist" class="sortablelist">
<%= render(:partial => "task", :object => @task, :collection => @tasks) %>
</ul>
<br/>
<br/>

<!-- Tasks done -->

<%= link_to_remote("Display done tasks",
   {:update => :tasksdone,
    :url =>{ :action => :display_tasks_done },
    :loading=>visual_effect('appear', 'loading2'),
    :success=>visual_effect('fade', 'loading2')},
   {:class=>'btnlnk', :id=>'done_link'})
%>
<img id="loading2" src="/images/loading.gif" style="display:none;">
<div id="tasksdone">
	<ul id="taskdoneul" class="mylist"></ul>
</div>
<%= sortable_element 'taskslist', :url => { :action => "order" } %>
<% end %>
